 function isMobile() {
            let userAgentInfo = navigator.userAgent;
            let Agents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
            let getArr = Agents.filter(i => userAgentInfo.includes(i));
            return getArr.length ? true : false;
        }

        // 值改变
        AttachXFormValueChangeEventById("fd_3b1b9e61b62820", money_2);
        AttachXFormValueChangeEventById("fd_3b1b9ed4a508be", money_2);
        AttachXFormValueChangeEventById("fd_3b1b9f3cc2d7b8", money_2);
        AttachXFormValueChangeEventById("fd_3b1b9f3cc2d7b8", money_2);
        AttachXFormValueChangeEventById("fd_3b1b9f3a99ee6c", money_2);
        AttachXFormValueChangeEventById("fd_3b1b9f19787766", money_2);
        AttachXFormValueChangeEventById("fd_3b066e6f2f359a", money_2);

        // 计算金额
        function money_2() {
            console.log("money_2");
            var zj = 0;
            var zhj = 0;
            var jdhj = 0;
            var hzhj = 0;

            var tableLength = $("#TABLE_DL_fd_3b1b9da7fb75a2  tbody").eq(0).children("tr").length;
            if (!isMobile()) {
                if (tableLength > 3) {

                    // 明细表循环
                    for (let i = 0; i < tableLength - 3; i++) {

                        var day = document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9e61b62820)")[0].value;
                        var money = document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9ed4a508be)")[0].value;
                        var money2 = document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3a99ee6c)")[0].value;
                        var calculation = day * money;

                        var calculation2 = (day - 1) * money2;

                        SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f09953bbc)", calculation);
                        SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3cc2d7b8)", calculation2);

                        zj = Number(zj) + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f09953bbc)")[0].value);
                        SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f4b603b7c)", zj);

                        zhj = Number(zhj) + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f09953bbc)")[0].value) +
                            Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f19787766)")[0].value) +
                            Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3cc2d7b8)")[0].value);
                        hj = Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f09953bbc)")[0].value) +
                            Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f19787766)")[0].value) +
                            Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3cc2d7b8)")[0].value);
                        SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f403dda2e)", hj);
                        SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f4b603b7c)", zj);


                        jdhj = Number(jdhj) + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3cc2d7b8)")[0].value);
                        SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f458b515a)", jdhj);

                        hzhj = Number(hzhj) + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f403dda2e)")[0].value);
                        SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f4709edd0)", hzhj);

                        // console.log(zj);

                    }
                }
            } else {
                if (tableLength > 2) {

                    // 明细表循环
                    for (let i = 0; i < tableLength - 2; i++) {

                        // var day = document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9e61b62820)")[0].value;
                        // var money = document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9ed4a508be)")[0].value;
                        // var money2 = document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3a99ee6c)")[0].value;

                        var day = document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(8)').querySelector('td:nth-of-type(2)').querySelector('input').value
                        var money = document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(11)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value
                        var money2 = document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(18)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value
                        var calculation = day * money;
                        var calculation2 = (day - 1) * money2;
                        // 餐补预算
                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f09953bbc)", calculation);
                        // 酒店预算
                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3cc2d7b8)", calculation2);
                        document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(12)').querySelector('td:nth-of-type(2)').querySelector('input').value = calculation
                        document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(19)').querySelector('td:nth-of-type(2)').querySelector('input').value = calculation2

                        // zj = Number(zj) + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f09953bbc)")[0].value);
                        zj = Number(zj) + Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(12)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value);

                        // 合计
                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f4b603b7c)", zj);
                        document.querySelector('#mui_form_Input_10').querySelector('input').value = zj


                        // zhj = Number(zhj) + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f09953bbc)")[0].value)
                        //   + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f19787766)")[0].value)
                        //   + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3cc2d7b8)")[0].value);
                        // hj = Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f09953bbc)")[0].value)
                        //   + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f19787766)")[0].value)
                        //   + Number(document.getElementsByName("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f3cc2d7b8)")[0].value);
                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f403dda2e)", hj);
                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f4b603b7c)", zj);


                        zhj = Number(zhj) + Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(12)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value) +
                            Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(17)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value) +
                            Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(19)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value);
                        hj = Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(12)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value) +
                            Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(17)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value) +
                            Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(19)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value);
                        // 合计
                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9da7fb75a2." + i + ".fd_3b1b9f403dda2e)", hj);
                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f4b603b7c)", zj);
                        // 合计
                        document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(20)').querySelector('td:nth-of-type(2)').querySelector('input').value = hj
                        document.querySelector('#mui_form_Input_10').querySelector('input').value = zj

                        // jdhj = Number(jdhj) + Number(document.getElementsByName("extendDataFormInfo.value(fd_3adf379fad9e64." + i + ".fd_3af2317ea0fdee)")[0].value);
                        jdhj = Number(jdhj) + Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(19)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value);

                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f458b515a)", jdhj);
                        document.querySelector('#mui_form_Input_11').querySelector('input').value = jdhj

                        // hzhj = Number(hzhj) + Number(document.getElementsByName("extendDataFormInfo.value(fd_3adf379fad9e64." + i + ".fd_3b040cc660bf2c)")[0].value);
                        hzhj = Number(hzhj) + Number(document.querySelector('#TABLE_DL_fd_3b1b9da7fb75a2').querySelectorAll('.muiSimple.muiDetailTable')[i].querySelector('tr:nth-of-type(20)').querySelector('td:nth-of-type(2)').querySelector('input:nth-of-type(1)').value);

                        // SetXFormFieldValueById("extendDataFormInfo.value(fd_3b1b9f4709edd0)", hzhj);
                        document.querySelector('#mui_form_Input_12').querySelector('input').value = hzhj

                        // console.log(zj);

                    }
                }
            }

        }